//
//  SubjectsManager.h
//  
//
//  Created by Christian Speich on 17.12.07.
//  Copyright 2007 Christian Speich. All rights reserved.
//

#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
#ifdef IPHONE
#  import <UIKit/CDStructures.h>
#  import <UIKit/UIHardware.h>
#  import <UIKit/UIApplication.h>
#  import <UIKit/UIKit.h>
#else
#  import <Cocoa/Cocoa.h>
#endif

@class Pupil;
@class Subject;
@class XMLClass;

@interface SubjectsManager : NSObject {
	NSString *file;
	Pupil* pupil;
	XMLClass* xmlClass;
}

- (void)setFile:(NSString*)file;
- (NSString*)file;

- (bool)readFile;
- (bool)readData:(NSData*)data;
- (bool)writeFile;
- (NSData*)data;
- (Pupil*)pupil;

- (NSMutableArray*)mainSubjects;
- (NSMutableArray*)subjects;
- (Subject*)subjectAtIndex:(int)i;

- (float)average;

@end
